#include<iostream>
#include<algorithm>
using namespace std;
typedef long long LL;
const int N=1e5+10;
struct node
{
	LL w;
	LL s;
	LL id;
}a[N*2],x[N*2],y[N*2];
LL n,r,q,pos;
bool cmp(node x,node y)
{
	if(x.s==y.s)
	{
		return x.id<y.id; 
	}
	return x.s>y.s;
}
void merge()
{
	int l=1,r=1;
	int idx=1;
	while(l<=n&&r<=n)
	{
		if(x[l].s>y[r].s||(x[l].s==y[r].s&&x[l].id<y[r].id))//注意这个比较逻辑 
		{
			a[idx++]=x[l++];
		}
		else
		{
			a[idx++]=y[r++];
		}
	}
	while(l<=n) a[idx++]=x[l++];
	while(r<=n) a[idx++]=y[r++];
}
int main()
{
	cin>>n>>r>>q;
	for(int i=1;i<=n*2;i++)
	{
	
		cin>>a[i].s;
		a[i].id=i;
	}
	for(int i=1;i<=n*2;i++)
	{
		cin>>a[i].w;
	}
	sort(a+1,a+1+n+n,cmp);
	while(r--)
	{
		//进行r轮
		pos=1;
		 for(int i=1;i<=n*2;i+=2)
		 {
		 	if(a[i].w>a[i+1].w)
		 	{
		 		a[i].s++;
		 		x[pos]=a[i];
		 		y[pos]=a[i+1];
			 }
			 else
			 {
			 	a[i+1].s++;
			 	x[pos]=a[i+1];
			 	y[pos]=a[i];
			 }
			 pos++;
		 }
		 merge();
	}
	cout<<a[q].id<<endl;
	return 0;
}